import request from '@/utils/request';

// 上传回显
export const getDownloadPath = data => {
  return request({
    url: '/file/downloadPath?filePath=' + data,
    method: 'get',
  });
};
// 数据导入列表查询
export const getDataImportList = data => {
  return request({
    url: '/businessbase/dataImportRecord/query',
    method: 'post',
    data,
  });
};
// 获取省数据
export const provinceList = () => {
  return request({
    url: '/system/sys_area/province',
    method: 'get',
  });
};
// 获取市/县 数据
export const citysList = data => {
  return request({
    url: '/system/sys_area/getAreaListByParent',
    method: 'get',
    params: data,
  });
};
//获得省市区
export const getAreaList = data => {
  return request({
    url: '/energyservice/building/getAreaList',
    method: 'post',
    data,
  });
};
// 获取机构列表
export const getBuildingByArea = data => {
  return request({
    url: '/energyservice/enterprise/getEnterPriseByarea',
    method: 'post',
    data,
  });
};
// 查询碳排概况
export const getCarbonBudget = data => {
  return request({
    url: '/energyservice/enQuota/getCarbonBudget',
    method: 'post',
    data,
  });
};
// 查询碳排概况
export const getEnegySave = data => {
  return request({
    url: '/energyservice/enQuota/getEnegySave',
    method: 'post',
    data,
  });
};
//查询配额
export const queryQuota = data => {
  return request({
    url: '/energyservice/enQuota/queryQuota',
    method: 'post',
    data,
  });
};
// 入库配额
export const insertQuota = data => {
  return request({
    url: '/energyservice/enQuota/insertQuota',
    method: 'post',
    data,
  });
};
export const getCarbonRateTG = data => {
  return request({
    url: '/energyservice/enQuota/getCarbonRateTG',
    method: 'post',
    data,
  });
};
export const getCarbonTable = data => {
  return request({
    url: '/energyservice/enQuota/getCarbonTable',
    method: 'post',
    data,
  });
};
export const getCarbonRateJC = data => {
  return request({
    url: '/energyservice/enQuota/getCarbonRateJC',
    method: 'post',
    data,
  });
};

export const getCEQuota = data => {
  return request({
    url: '/energyservice/enQuota/queryQuota',
    method: 'post',
    data,
  });
};

// 查询机构信息
export const getEntInfo = data => {
  return request({
    url: '/energyservice/enterprise/getInfo',
    method: 'post',
    data,
  });
};
// 托管能耗基准收益
export const getByDateEnergyResult = data => {
  return request({
    url: '/energyservice/overview/getByDateEnergyResult',
    method: 'post',
    data,
  });
};
// 监测机构-水/电/气/暖能耗报表
export const getBuildingReports = data => {
  return request({
    url: '/energyservice/energy/getBuildingReports',
    method: 'post',
    data,
  });
};
//监测机构-系统设备报表
export const getEquSysReports = data => {
  return request({
    url: '/energyservice/euqSys/getEquSysReports',
    method: 'post',
    data,
  });
};
//监测机构-系统设备报表下方表格
export const getEquSysTable = data => {
  return request({
    url: '/energyservice/euqSys/getEquSysTable',
    method: 'post',
    data,
  });
};
// 监测项目列表
export const getMonitorNums = data => {
  return request({
    url: '/energyservice/OverviewMonitor/selectProjectOrInstitution',
    method: 'post',
    data,
  });
};
// 监测项目列表
export const getMonitorLists = data => {
  return request({
    url: '/energyservice/monitor/project/search',
    method: 'post',
    data,
  });
};
//新增监测项目
export const addMonitor = data => {
  return request({
    url: '/energyservice/monitor/project/add',
    method: 'post',
    data,
  });
};
/**
 * 删除监测项目
 * @param {*} data
 * @returns
 */
export const removeMP = data => {
  return request({
    url: '/energyservice/monitor/project/remove',
    method: 'post',
    data,
  });
};
//查询监测项目结构树
export const getMPTree = data => {
  return request({
    url: '/energyservice/monitor/project/treeData',
    method: 'post',
    data,
  });
};
//查询监测项目
export const getMPInfo = data => {
  return request({
    url: '/energyservice/monitor/project/getInfo',
    method: 'post',
    data,
  });
};
//更新监测项目
export const updateMonitor = data => {
  return request({
    url: '/energyservice/monitor/project/update',
    method: 'post',
    data,
  });
};
//查询项目合同信息
export const getMAInfo = data => {
  return request({
    url: '/energyservice/monitor/agreement/getInfo',
    method: 'post',
    data,
  });
};

//保存监测项目合同
export const saveMA = data => {
  return request({
    url: '/energyservice/monitor/agreement/save',
    method: 'post',
    data,
  });
};
//查询新闻咨询
export const getNewsInfor = data => {
  return request({
    url: '/energyservice/system/information/list',
    method: 'post',
    data,
  });
};
//新增新闻咨询
export const addNewsInfor = data => {
  return request({
    url: '/energyservice/system/information/add',
    method: 'post',
    data,
  });
};
//修改新闻咨询
export const editZx = data => {
  return request({
    url: '/energyservice/system/information/edit',
    method: 'post',
    data,
  });
};
//删除/批量删除咨询
export const removeZx = data => {
  return request({
    url: '/energyservice/system/information/remove',
    method: 'post',
    data,
  });
};
//监测能效诊断
export const getByJCDateEnergyResult = data => {
  return request({
    url: '/energyservice/NewOverviewController/getDiagnosisMonitor',
    method: 'post',
    data,
  });
};
//托管能效诊断
export const getByTGDateEnergyResult = data => {
  return request({
    url: '/energyservice/NewOverviewController/getDiagnosisTrusteeship',
    method: 'post',
    data,
  });
};
//查询工单列表
export const getWorkorderList = data => {
  return request({
    url: '/energyservice/workorder/search',
    method: 'post',
    data,
  });
};
//查询工单数量
export const getWorkorderNumStat = data => {
  return request({
    url: '/energyservice/workorder/numStat',
    method: 'post',
    data,
  });
};
//查询企业名录列表
export const getInstitutionList = data => {
  return request({
    url: '/energyservice/overviewAnalysis/getInstitutionList',
    method: 'post',
    data,
  });
};
//查询企业名录详情
export const getInstitutionInfo = data => {
  return request({
    url: '/energyservice/overviewAnalysis/getInstitutionInfo',
    method: 'post',
    data,
  });
};
//查询企业名录用能
export const getInstitutionUsageEnergy = data => {
  return request({
    url: '/energyservice/overviewAnalysis/getInstitutionUsageEnergy',
    method: 'post',
    data,
  });
};
//查询合同
export const getContractM = data => {
  return request({
    url: '/energyservice/uploadFile/getList',
    method: 'post',
    data,
  });
};
//上传文件
export const addFile = data => {
  return request({
    url: '/energyservice/uploadFile/addFile',
    method: 'post',
    data,
  });
};
//编辑文件
export const editFile = data => {
  return request({
    url: '/energyservice/uploadFile/edit',
    method: 'post',
    data,
  });
};
//删除文件
export const deleteUploadFile = data => {
  return request({
    url: '/energyservice/uploadFile/delete?id=' + data,
    method: 'get',
    data,
  });
};
//监测设置页面查询
export const getMornitorProjecttInfo = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getMornitorProjecttInfo',
    method: 'post',
    data,
  });
};

// 查询收资信息
export const getInfo = data => {
  return request({
    url: '/energyservice/questionnaire/getInfo',
    method: 'post',
    data,
  });
};
// 查询用能历史
export const getEnergyHistory = data => {
  return request({
    url: '/energyservice/usageEnergyHistory/list',
    method: 'post',
    data,
  });
};

// 企业列表
export const getListPagination = data => {
  return request({
    url: '/energyservice/enterprise/listPagination',
    method: 'post',
    data,
  });
};
//企业列表上方统计数据
export const getListStatistics = data => {
  return request({
    url: '/energyservice/enterprise/listStatistics',
    method: 'post',
    data,
  });
};
// 机构查询
export const getList = data => {
  return request({
    url: '/energyservice/enterprise/listSimpleInfo',
    method: 'post',
    data,
  });
};
/**
 * 单个企业查询
 */
export const getEnterpriseIItem = data => {
  return request({
    url: '/energyservice/enterprise/' + data,
    method: 'get',
    // data,
  });
};
/**
 * 获得能源类型(水电气暖)
 */
export const getType = data => {
  return request({
    url: '/energyservice/energyType/getType',
    method: 'get',
    params: data,
  });
};
/**
 * 获得能源类型(水电气暖)
 */
export const getType2 = data => {
  return request({
    url: '/energyservice/energyType/getType?all=1',
    method: 'get',
    params: data,
  });
};
/**
 * 添加企业
 * @param {*} data
 * @returns
 */
export const addEnterprise = data => {
  return request({
    url: '/energyservice/enterprise/add',
    method: 'post',
    data,
  });
};
/**
 * 编辑企业
 * @param {*} data
 * @returns
 */
export const editEnterprise = data => {
  return request({
    url: '/energyservice/enterprise/edit',
    method: 'post',
    data,
  });
};
/**
 * 删除企业
 * @param {*} data
 * @returns
 */
export const deleteEnterprise = data => {
  return request({
    url: '/energyservice/enterprise/delete',
    method: 'post',
    data,
  });
};
//企业建筑架构树状列表-单个企业全部数据
export const getTreeData = data => {
  return request({
    url: '/energyservice/building/treeData/oneEnterprise',
    method: 'post',
    data,
  });
};
//企业建筑架构树状列表-企业到楼栋
export const getAllBuilding = data => {
  return request({
    url: '/energyservice/building/treeData/all/building',
    method: 'post',
    data,
  });
};
//上传可行性报告树
export const getOneEnterprise = data => {
  return request({
    url: '/energyservice/building/treeData/oneEnterprise/building',
    method: 'post',
    data,
  });
};
//
export const getKxxbgData = data => {
  return request({
    url: '/energyservice/feasibilityReport/getInfo',
    method: 'post',
    data,
  });
};
//查询可行性报告列表
export const getKxxbgLists = data => {
  return request({
    url: '/energyservice/feasibilityReport/list',
    method: 'post',
    data,
  });
};

// 单位/项目查询
export const getAreaOrProject = data => {
  return request({
    url: '/energyservice/overview/getAreaOrProject',
    method: 'post',
    data,
  });
};
/**
 * 新增单位/区域
 * @param {*} data
 * @returns
 */
export const addBuilding = data => {
  return request({
    url: '/energyservice/building/add',
    method: 'post',
    data,
  });
};
/**
 * 编辑单位/区域回显
 * @param {*} data
 * @returns
 */
export const getEditBuilding = data => {
  return request({
    url: '/energyservice/building/getInfo',
    method: 'post',
    data,
  });
};
/**
 * 编辑单位/区域
 * @param {*} data
 * @returns
 */
export const editBuilding = data => {
  return request({
    url: '/energyservice/building/edit',
    method: 'post',
    data,
  });
};
/**
 * 区域导入数据保存
 * @param {*} data
 * @returns
 */
export const importSave = data => {
  return request({
    url: '/energyservice/building/importSave',
    method: 'post',
    data,
  });
};
/**
 * 查询项目
 * @param {*} data
 * @returns
 */
export const getProjectByIn = data => {
  return request({
    url: '/energyservice/project/getProjectByIn',
    method: 'post',
    data,
  });
};
/**
 * 获取托管项目状态
 * @param {*} data
 * @returns
 */
export const getProjectStage = data => {
  return request({
    url: '/energyservice/project/getProjectStage?type=' + data,
    method: 'post',
  });
};
/**
 * 根据机构修改项目状态
 * @param {*} data
 * @returns
 */
export const updateProjectByIn = data => {
  return request({
    url: '/energyservice/project/updateProjectByIn',
    method: 'post',
    data,
  });
};
/**
 * 根据机构查询托管类型
 * @param {*} data
 * @returns
 */
export const getEnEnergyType = data => {
  return request({
    url: '/energyservice/project/getEnEnergyTypeByProject',
    method: 'post',
    data,
  });
};
/**
 * 查询所有能源类型
 * @param {*} data
 * @returns
 */
export const getEnergyList = data => {
  return request({
    url: '/energyservice/energyType/list',
    method: 'post',
    data,
  });
};
/**
 * 添加项目
 * @param {*} data
 * @returns
 */
export const addProject = data => {
  return request({
    url: '/energyservice/project/addProject',
    method: 'post',
    data,
  });
};
/**
 * 修改项目
 * @param {*} data
 * @returns
 */
export const updateTGProject = data => {
  return request({
    url: '/energyservice/project/updateProject',
    method: 'post',
    data,
  });
};
/**
 * 删除项目
 * @param {*} data
 * @returns
 */
export const deleteProject = data => {
  return request({
    url: '/energyservice/project/deleteProject',
    method: 'post',
    data,
  });
};
/**
 * 查询项目变更记录
 * @param {*} data
 * @returns
 */
export const getProHistory = data => {
  return request({
    url: '/energyservice/project/getProjectHistoryByIn',
    method: 'post',
    data,
  });
};
/**
 * 查询基准
 * @param {*} data
 * @returns
 */
export const getBasisList = data => {
  return request({
    url: '/energyservice/basis/getBasisList',
    method: 'post',
    data,
  });
};
/**
 * 添加基准
 * @param {*} data
 * @returns
 */
export const addBasisList = data => {
  return request({
    url: '/energyservice/basis/batchInsertEnBasisVo',
    method: 'post',
    data,
  });
};
/**
 * 基准修改
 * @param {*} data
 * @returns
 */
export const editBasis = data => {
  return request({
    url: '/energyservice/basis/batchInsertEnBasisHistory',
    method: 'post',
    data,
  });
};
/**
 * 查询历史基准
 * @param {*} data
 * @returns
 */
export const getBasisHistoryList = data => {
  return request({
    url: '/energyservice/basis/getBasisHistoryList',
    method: 'post',
    data,
  });
};
/**
 * 查询某个变更历史的历史
 * @param {*} data
 * @returns
 */
export const getEnBasisHistory = data => {
  return request({
    url: '/energyservice/basis/getEnBasisHistoryByModifyBatchs',
    method: 'post',
    data,
  });
};
/**
 * 删除基准
 * @param {*} data
 * @returns
 */
export const deleteEnBasisVo = data => {
  return request({
    url: '/energyservice/basis/deleteEnBasisVo',
    method: 'post',
    data,
  });
};

/**
 * 根据机构查询上方监测年限和能源类型
 * @param {*} data
 * @returns
 */
export const getProBaseInfo = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getProBaseInfo',
    method: 'post',
    data,
  });
};
/**
 * 监测设置页面查询
 * @param {*} data
 * @returns
 */
export const getMtProInfo = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getMornitorProjectInfo',
    method: 'post',
    data,
  });
};
/**
 * 监测设置提交按钮
 * @param {*} data
 * @returns
 */
export const submitMtProject = data => {
  return request({
    url: '/energyservice/OverviewMonitor/submitMonitorProject',
    method: 'post',
    data,
  });
};
/**
 * 监测设置历史
 * @param {*} data
 * @returns
 */
export const getProjectHistory = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getProjexHistory',
    method: 'post',
    data,
  });
};
/**
 * 判断项目返回年份集合
 * @param {*} data
 * @returns
 */
export const getProInfo = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getProInfo',
    method: 'post',
    data,
  });
};
/**
 * 考核指标查询
 * @param {*} data
 * @returns
 */
export const getMorProIndex = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getMorProIndex',
    method: 'post',
    data,
  });
};
/**
 * 提交按钮
 * @param {*} data
 * @returns
 */
export const submitIndexFile = data => {
  return request({
    url: '/energyservice/OverviewMonitor/submitIndexFile',
    method: 'post',
    data,
  });
};
/**
 * 指标变更-保存
 * @param {*} data
 * @returns
 */
export const zbbgChange = data => {
  return request({
    url: '/energyservice/OverviewMonitor/monitorIndexChange',
    method: 'post',
    data,
  });
};
/**
 * 指标变更-保存
 * @param {*} data
 * @returns
 */
export const getMorProHisTory = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getMorProIndexHisTory',
    method: 'post',
    data,
  });
};
/**
 * 指标变更-删除
 * @param {*} data
 * @returns
 */
export const deleteLszb = data => {
  return request({
    url: '/energyservice/OverviewMonitor/deleteMorProIndexHisTory',
    method: 'post',
    data,
  });
};
/**
 * 历史指标修改记录查询
 * @param {*} data
 * @returns
 */
export const getRecord = data => {
  return request({
    url: '/energyservice/OverviewMonitor/getMorProIndexHisToryRecord',
    method: 'post',
    data,
  });
};

/**
 * 删除单位/区域
 * @param {*} data
 * @returns
 */
export const deleteBuilding = data => {
  return request({
    url: '/energyservice/building/delete',
    method: 'post',
    data,
  });
};
/**
 * 单位类型下拉列表
 * @param {*} data
 * @returns
 */
export const getBranchType = data => {
  return request({
    url: '/energyservice/building/getBranchType',
    method: 'post',
    data,
  });
};
/**
 * 企业建筑架构树状列表-可行性报告反查report
 * @param {*} data
 * @returns
 */
export const getReportTree = data => {
  return request({
    url: '/energyservice/building/treeData/report',
    method: 'post',
    data,
  });
};
/**
 * 编辑可行性报告
 * @param {*} data
 * @returns
 */
export const updateReport = data => {
  return request({
    url: '/energyservice/feasibilityReport/update',
    method: 'post',
    data,
  });
};
/**
 * 删除可行性报告
 * @param {*} data
 * @returns
 */
export const removeReport = data => {
  return request({
    url: '/energyservice/feasibilityReport/remove',
    method: 'post',
    data,
  });
};
/**
 * 保存收资信息
 * @param {*} data
 * @returns
 */
export const saveQuestionnaire = data => {
  return request({
    url: '/energyservice/questionnaire/save',
    method: 'post',
    data,
  });
};
/**
 * 检索项目列表
 * @param {*} data
 * @returns
 */
export const searchProjectLists = data => {
  return request({
    url: '/energyservice/project/search',
    method: 'post',
    data,
  });
};
/**
 * 托管可行性报告availableList
 * @param {*} data
 * @returns
 */
export const getAvailableList = data => {
  return request({
    url: '/energyservice/feasibilityReport/availableList',
    method: 'post',
    data,
  });
};
/**
 * 添加托管项目
 * @param {*} data
 * @returns
 */
export const addMpBasicInfo = data => {
  return request({
    url: '/energyservice/project/add',
    method: 'post',
    data,
  });
};
/**
 * 项目详情getInfo
 * @param {*} data
 * @returns
 */
export const getProjectInfo = data => {
  return request({
    url: '/energyservice/project/getInfo',
    method: 'post',
    data,
  });
};
/**
 * 删除项目
 * @param {*} data
 * @returns
 */
export const removeProject = data => {
  return request({
    url: '/energyservice/project/remove',
    method: 'post',
    data,
  });
};
/**
 * 更新项目
 * @param {*} data
 * @returns
 */
export const updateProject = data => {
  return request({
    url: '/energyservice/project/update',
    method: 'post',
    data,
  });
};
/**
 * 变更记录
 * @param {*} data
 * @returns
 */
export const getBasisHistory = data => {
  return request({
    url: '/energyservice/basisHistory/list',
    method: 'post',
    data,
  });
};
/**
 * 查询项目合同信息getInfo
 * @param {*} data
 * @returns
 */
export const getAgreementInfo = data => {
  return request({
    url: '/energyservice/agreement/getInfo',
    method: 'post',
    data,
  });
};
/**
 * 修改项目合同信息
 * @param {*} data
 * @returns
 */
export const editAgreementInfo = data => {
  return request({
    url: '/energyservice/agreement/save',
    method: 'post',
    data,
  });
};
// 能耗/节能
export const entEngAmount = data => {
  return request({
    url: '/energyservice/overview/getEnergyBasis',
    method: 'post',
    data,
  });
};
// 能耗查询
export const entEngConsume = data => {
  return request({
    url: '/energyservice/overview/getSumEnergyConsume',
    method: 'post',
    data,
  });
};
// 企业能耗图表
export const entEngChartData = data => {
  return request({
    url: '/energyservice/NewOverviewController/getByDateEnergyResult',
    method: 'post',
    data,
  });
};
// 企业楼栋/楼层查询
export const getBuildingOrFloor = data => {
  return request({
    url: '/energyservice/overview/getBuilding',
    method: 'post',
    data,
  });
};
// 能源数据维护-企业列表
export const getEntList = data => {
  return request({
    url: '/energyservice/energy/getEnergyPriceByCode',
    method: 'post',
    data,
  });
};
// 能源数据维护-历史列表
export const getEngRecordList = data => {
  return request({
    url: '/energyservice/energy/getEnergyRecordList',
    method: 'post',
    data,
  });
};
// 能源数据维护-历史详情
export const getEngRecordDetail = data => {
  return request({
    url: '/energyservice/energy/getEnergyDeatialList',
    method: 'post',
    data,
  });
};
// 能源价格维护-企业列表
export const getEntPriceList = data => {
  return request({
    url: '/energyservice/price/getPriceByCode',
    method: 'post',
    data,
  });
};
// 能源价格维护-历史列表
export const getPriceRecordList = data => {
  return request({
    url: '/energyservice/price/getPriceRecordList',
    method: 'post',
    data,
  });
};
// 能源价格维护-历史详情
export const getPriceRecordDetail = data => {
  return request({
    url: '/energyservice/price/getPriceDeatialList',
    method: 'post',
    data,
  });
};
// 能源报告-查询
export const getEngConsumeRep = data => {
  return request({
    url: '/energyservice/overview/getByMonthEnergyConsume',
    method: 'post',
    data,
  });
};
// 风险等级类型联动
export const getRiskType = data => {
  return request({
    url: '/energyservice/library/getLevelList',
    method: 'post',
    data,
  });
};
// 风险库列表查询
export const getRiskList = data => {
  return request({
    url: '/energyservice/library/selectRiskList',
    method: 'post',
    data,
  });
};
// 风险库详情
export const getRiskDetail = id => {
  return request({
    url: `/energyservice/library/${id}`,
    method: 'get',
  });
};
// 新增风险库
export const addRisk = data => {
  return request({
    url: '/energyservice/library/insert',
    method: 'post',
    data,
  });
};
// 更新风险库
export const updateRisk = data => {
  return request({
    url: '/energyservice/library/update',
    method: 'post',
    data,
  });
};
// 删除风险库
export const delRisk = id => {
  return request({
    url: `/energyservice/library/${id}`,
    method: 'post',
  });
};
/**
 * 按指定区域(或类别)统计用电(水)量及同环比
 * @param {*} data
 * @returns
 */
export const getQueryStat = data => {
  return request({
    url: '/energyservice/monitor/data/queryStat',
    method: 'post',
    data,
  });
};
// 企业查询
export const getEnterpriseList = data => {
  return request({
    url: '/energyservice/monitor/enterprise/list',
    method: 'post',
    data,
  });
};
/**
 * 企业目录树
 * @param {*} data
 * @returns
 */
export const getCompanyTree = data => {
  return request({
    url: '/energyservice/moniter/directory/companyTree',
    method: 'post',
    data,
  });
};
/**
 * 企业设备类型
 * @param {*} data
 * @returns
 */
export const getTypeList = data => {
  return request({
    url: '/energyservice/monitor/device/typeList',
    method: 'post',
    data,
  });
};
// 数据记录-能源类型select
export const getEnergyType = () => {
  return request({
    url: '/energyservice/energy/getEnergyType',
    method: 'get',
  });
};
// 数据记录-设备系统select
export const getDeviceSys = query => {
  return request({
    url: '/energyservice/energy/getEquSys',
    method: 'get',
    params: query,
  });
};
// 数据记录-区域能耗查询
export const getAreaConsume = data => {
  return request({
    url: '/energyservice/energy/queryAreaEnergy',
    method: 'post',
    data,
  });
};
// 数据记录-表记能耗查询
export const getGaugesEnergy = data => {
  return request({
    url: '/energyservice/gaugesEnergy/queryGaugesEnergy',
    method: 'post',
    data,
  });
};
// 数据记录-获得提醒信息
export const getNoticeInfo = data => {
  return request({
    url: '/energyservice/energy/getNoticeInfo',
    method: 'post',
    data,
  });
};
// 数据记录-设备系统能耗查询
export const queryEquSys = data => {
  return request({
    url: '/energyservice/energy/queryEquSys',
    method: 'post',
    data,
  });
};
// 数据记录-设备系统能耗查询
export const getDeviceSysConsume = data => {
  return request({
    url: '/energyservice/energy/selectEquSys',
    method: 'post',
    data,
  });
};
// 数据记录-能源价格查询
export const getSelectUsePrice = data => {
  return request({
    url: '/energyservice/price/queryEnergyPrice',
    method: 'post',
    data,
  });
};
// 数据记录-企业列表
export const getEntLists = () => {
  return request({
    url: '/energyservice/energy/getEnterPrieceList',
    method: 'get',
  });
};
// 数据记录-企业子集节点列表
export const getEntSubList = query => {
  return request({
    url: '/energyservice/energy/getBuildList',
    method: 'get',
    params: query,
  });
};
// 管理侧-运营报告 获取机构列表
export const getEntSubByType = data => {
  return request({
    url: '/energyservice/building/getAllBuildingInstitution',
    method: 'post',
    data,
  });
};
// 运营报告-托管PDF数据
export const getTGOperationData = data => {
  return request({
    url: '/energyservice/overview/getByDateEnergyTGPDF',
    method: 'post',
    data,
  });
};
// 运营报告-监测PDF数据
export const getJCOperationData = data => {
  return request({
    url: '/energyservice/overview/getByDateEnergyJCPDF',
    method: 'post',
    data,
  });
};
// 运营报告-能耗、设备告警
export const getEnergyAlarm = data => {
  return request({
    url: '/energyservice/overview/getAlarmData',
    method: 'post',
    data,
  });
};
// 运营报告-工单数据统计
export const getOrderData = data => {
  return request({
    url: '/energyservice/overview/getWorkOrder',
    method: 'post',
    data,
  });
};
// 告警日历
export const getAlarmCalendar = data => {
  return request({
    url: '/energyservice/alarm/getAlarmCalendar',
    method: 'post',
    data,
  });
};
// 能源流向
export const getEnergyFlow = data => {
  return request({
    url: '/energyservice/overviewAnalysis/getEnergyDirByDateResult',
    method: 'post',
    data,
  });
};
// 门户列表-监测
export const getJCList = data => {
  return request({
    url: '/energyservice/overview/getDateCoalValueAllInstitution',
    method: 'post',
    data,
  });
};
// 监测大屏地图和机构列表
export const getJCData = data => {
  return request({
    url: '/energyservice/overallShow/institutionlist/jc',
    method: 'post',
    data,
  });
};
// 托管大屏地图和机构列表
export const getTGData = data => {
  return request({
    url: '/energyservice/overallShow/institutionlist/tg',
    method: 'post',
    data,
  });
};
// 监测能耗/碳排趋势
export const getEngJCTrend = data => {
  return request({
    method: 'post',
    url: '/energyservice/NewOverviewController/getDateCoalValue',
    data,
  });
};
// 设备系统能耗占比
export const getDSECRatio = data => {
  return request({
    method: 'post',
    url: '/energyservice/euqSys/getEquSysRate',
    data,
  });
};
// 设备系统能耗趋势
export const getDSECTrend = data => {
  return request({
    method: 'post',
    url: '/energyservice/euqSys/getEquSysReports',
    data,
  });
};
// 水电气分项能耗节能数据
export const getSubsidyData = data => {
  return request({
    method: 'post',
    url: '/energyservice/screen/energyTypeUsageSaving',
    data,
  });
};
// 能耗报告chart图片上传
export const uploadRepImg = data => {
  return request({
    method: 'post',
    url: '/energyservice/report/collectPictures',
    data,
  });
};
// 新增/修改接口
// 设备系统树列表
export const getDeviceSysTree = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/system/tree',
    data,
  });
};
// 查询设备系统信息
export const getDSNodeInfo = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/system/getInfo',
    data,
  });
};
// 新增设备系统
export const addDeviceSys = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/system/add',
    data,
  });
};
// 编辑设备系统
export const editDeviceSys = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/system/edit',
    data,
  });
};
// 删除设备系统
export const delDeviceSys = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/system/delete',
    data,
  });
};
// 设备系统导入数据保存
export const saveDeviceSys = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/system/importSave',
    data,
  });
};
// 计量表类型列表
export const getMeterTypeList = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/type/list',
    data,
  });
};
// 计量表分页列表
export const getMeterList = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/list',
    data,
  });
};
// 添加计量表
export const addMeter = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/add',
    data,
  });
};
// 编辑计量表
export const editMeter = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/edit',
    data,
  });
};
// 删除计量表
export const delMeter = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/delete',
    data,
  });
};
// 计量表导入数据保存
export const saveMeter = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/importSave',
    data,
  });
};
// 绑定页面计量表列表
export const getBindMeterList = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/bind/list',
    data,
  });
};
// 绑定计量表
export const bindMeter = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/bind',
    data,
  });
};
// 解绑计量表
export const unbindMeter = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/unbind',
    data,
  });
};
// 表计拓扑-建筑导入数据保存
export const saveBuildingImport = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/topology/importsave/building',
    data,
  });
};
// 表计拓扑-设备系统导入数据保存
export const saveDsImport = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/topology/importsave/ds',
    data,
  });
};

// 根据机构获得能源类型
export const getEngTypesByCode = data => {
  return request({
    method: 'post',
    url: '/energyservice/energyType/getTypeByEnterPrise',
    data,
  });
};
// 机构概览机构基本信息
export const getInsInfo = data => {
  return request({
    method: 'post',
    url: '/energyservice/NewOverviewController/getOverviewHomeDetail',
    data,
  });
};
// 机构概览数据统计
export const getOvStatistics = data => {
  return request({
    method: 'post',
    url: '/energyservice/NewOverviewController/getByEnergyTypeGetValue',
    data,
  });
};
// 机构区域能耗统计
export const getInsAreaEnergy = data => {
  return request({
    method: 'post',
    url: '/energyservice/NewOverviewController/getAreaEnergyValue',
    data,
  });
};
// 机构首页-数据统计
export const getInsDataCount = data => {
  return request({
    method: 'post',
    url: '/energyservice/TotalValueOverview/getTotalValue',
    data,
  });
};
// 机构首页-托管/监测-机构分类占比
export const getInsTypeCount = data => {
  return request({
    method: 'post',
    url: '/energyservice/overallShow/typeProportion',
    data,
  });
};
// 机构首页-托管合同类型占比
export const getDealTypeCount = data => {
  return request({
    method: 'post',
    url: '/energyservice/TotalValueOverview/getProportionByType',
    data,
  });
};
// 信息维护-添加计量表类型
export const addMeterType = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/type/add',
    data,
  });
};
// 信息维护-编辑计量表类型
export const editMeterType = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/type/edit',
    data,
  });
};
// 信息维护-删除计量表类型
export const delMeterType = data => {
  return request({
    method: 'post',
    url: '/energyservice/device/type/delete',
    data,
  });
};
// 信息维护-能源类型新增
export const addEngType = data => {
  return request({
    method: 'post',
    url: '/energyservice/energyType/add',
    data,
  });
};
// 信息维护-能源类型编辑
export const editEngType = data => {
  return request({
    method: 'post',
    url: '/energyservice/energyType/edit',
    data,
  });
};
// 信息维护-能源类型删除
export const delEngType = data => {
  return request({
    method: 'post',
    url: `/energyservice/energyType/remove?ids=${data}`,
  });
};
// 信息维护-能源计费方式查询
export const getEngBillList = data => {
  return request({
    method: 'post',
    url: '/energyservice/priceType/list',
    data,
  });
};
// 信息维护-能源计费方式新增
export const addEngBill = data => {
  return request({
    method: 'post',
    url: '/energyservice/priceType/add',
    data,
  });
};
// 信息维护-能源计费方式编辑
export const editEngBill = data => {
  return request({
    method: 'post',
    url: '/energyservice/priceType/edit',
    data,
  });
};
// 信息维护-能源计费方式删除
export const delEngBill = data => {
  return request({
    method: 'post',
    url: `/energyservice/priceType/remove?ids=${data}`,
  });
};
// 信息维护-折标系数查询
export const getStdCoalCoeff = data => {
  return request({
    method: 'post',
    url: '/energyservice/enRatio/query',
    data,
  });
};
// 信息维护-折标系数修改
export const editStdCoalCoeff = data => {
  return request({
    method: 'post',
    url: '/energyservice/enRatio/submit',
    data,
  });
};
// 当日告警列表
export const getAlarmList = data => {
  return request({
    method: 'post',
    url: '/energyservice/alarm/getHomeAlarmRoll',
    data,
  });
};
// 获取通知列表
export const getNoticeList = data => {
  return request({
    method: 'post',
    url: '/energyservice/message/list',
    data,
  });
};
// 告警统计
export const alarmStastic = data => {
  return request({
    method: 'post',
    url: '/energyservice/alarm/alarmStastic',
    data,
  });
};
// 费用分析
export const getFeeStatistics = data => {
  return request({
    method: 'post',
    url: '/energyservice/Replenish/energyConsumptionList',
    data,
  });
};
// 费用总统计
export const energyConsumptionBydate = data => {
  return request({
    method: 'post',
    url: '/energyservice/Replenish/energyConsumptionBydate',
    data,
  });
};
// 能耗占比
export const energyConsumptionRatio = data => {
  return request({
    method: 'post',
    url: '/energyservice/Replenish/energyConsumptionRatio',
    data,
  });
};
// 区域能耗排名
export const energyConsumptionRanking = data => {
  return request({
    method: 'post',
    url: '/energyservice/Replenish/energyConsumptionRanking',
    data,
  });
};
// 能耗趋势
export const totalMeterOverview = data => {
  return request({
    method: 'post',
    url: '/energyservice/energy/totalMeterOverview',
    data,
  });
};
